﻿@using WebSimplicity.Data.Helpers;
@Html.Partial("_LogOnPartial")
@{if (User.Identity.IsAuthenticated)
  {
    <text>
    <ul id="sidemenu">
        <li class="@ViewBag.DashboardState"><a href="/admin/dashboard">
            <img src="@Url.Content("~/content/icons/dashboard.png")" alt="" />Dashboard</a></li>
        <li class="accordion @ViewBag.PagesState"><a href="/admin/pages">
            <img src="@Url.Content("~/content/icons/blue-document--pencil.png")" alt="" />Pages</a>
        </li>
        @if (Config.GetApplicationSetting("BlogInstalled") == "true")
        {<text>
        <li class="accordion @ViewBag.BlogState"><a>
            <img src="@Url.Content("~/content/icons/blog--pencil.png")" alt="" />Blog</a>
        </li></text>
        }
        @if (Config.GetApplicationSetting("ForumInstalled") == "true")
        {<text>
        <li class="accordion @ViewBag.ForumState"><a>
            <img src="@Url.Content("~/content/icons/book-question.png")" alt="" />Forum</a>
        </li></text>
        }
        @if (Config.GetApplicationSetting("StoresInstalled") == "true")
         {<text>
        <li class="accordion @ViewBag.EcommerceState"><a>
            <img src="@Url.Content("~/content/icons/money--pencil.png")" alt="" />E-Commerce</a>
            <div class="content">
                <ul>
                    <li>@Html.ActionLink("Categories", "Categories")</li>
                    <li>@Html.ActionLink("Products", "Products")</li></ul>
            </div>
        </li>
        </text>
         }
        <li class="accordion @ViewBag.ThemesState"><a>
            <img src="@Url.Content("~/content/icons/blue-document-template.png")" alt="" />Themes</a></li>
        <li class="accordion @ViewBag.ReportState"><a>
            <img src="@Url.Content("~/content/icons/target.png")" alt="" />Reports</a></li>
        <li class="accordion @ViewBag.ReportState"><a>
            <img src="@Url.Content("~/content/icons/server-property.png")" alt="" />Settings</a></li>
        <li class="@ViewBag.ReportState"><a href="/admin/account/logoff">
            <img src="@Url.Content("~/content/icons/door-open-out.png")" alt="" />Log
            Out</a></li>
    </ul>
    <script type="text/javascript">
        $(document).ready(function () {
            $('.active').children('.content').toggle();
            $('.accordion').children('a').click(function () {
                $(this).parent().children('.content').slideToggle();
            });
        });
    </script></text>
  }
}
